import { CustomSubTitle } from "@/components/customTitle";
import { ProFormDatePicker } from "@ant-design/pro-components";
// import dayjs from "dayjs";

const MyDatePicker = () => {
  const RenderLabel = (label: string) => {
    return (
      <CustomSubTitle style={{ fontSize: "20px" }}>{label}</CustomSubTitle>
    );
  };
  // 获取当前日期
  // const today = dayjs();

  // 获取当月的开始和结束日期
  // const startOfMonth = today.startOf("month");
  // const endOfMonth = today.endOf("month");

  // // 获取下个月的开始和结束日期
  // const startOfNextMonth = today.add(1, "month").startOf("month");
  // const endOfNextMonth = today.add(1, "month").endOf("month");

  return (
    <ProFormDatePicker
      name="dateRange"
      label={RenderLabel("Choose Parking Entry Date")}
      rules={[
        {
          // required: true,
          message: `please  select date`,
        },
      ]}
      // 自定义日期格式
      // fieldProps={{
      //   format: "YYYY-MM-DD",
      // }}
    />
  );
};

export default MyDatePicker;
